From a3d4fe118418e68d3b929bbd84fef843cdbf2330 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Sat, 5 Nov 2022 22:35:54 +0100 Subject: [PATCH] [PATCH] Add support of the next Ubuntu (Ubuntu 23.04 - Lunar Lobster) Gbp-Pq: Name ubuntu-releases.patch --- clang/include/clang/Driver/Distro.h | 6 +++++- clang/lib/Driver/Distro.cpp | 4 ++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/clang/include/clang/Driver/Distro.h b/clang/include/clang/Driver/Distro.h index dbc8b36e27..09e21b7d7b 100644 --- a/clang/include/clang/Driver/Distro.h +++ b/clang/include/clang/Driver/Distro.h @@ -75,6 +75,10 @@ public: UbuntuImpish, UbuntuJammy, UbuntuKinetic, + UbuntuLunar, + UbuntuMantic, + UbuntuNoble, + UbuntuOracular, UnknownDistro }; @@ -126,7 +130,7 @@ public: } bool IsUbuntu() const { - return DistroVal >= UbuntuHardy && DistroVal <= UbuntuKinetic; + return DistroVal >= UbuntuHardy && DistroVal <= UbuntuOracular; } bool IsAlpineLinux() const { return DistroVal == AlpineLinux; } diff --git a/clang/lib/Driver/Distro.cpp b/clang/lib/Driver/Distro.cpp index a550377314..2febfc92e5 100644 --- a/clang/lib/Driver/Distro.cpp +++ b/clang/lib/Driver/Distro.cpp @@ -92,6 +92,10 @@ static Distro::DistroType DetectLsbRelease(llvm::vfs::FileSystem &VFS) { .Case("impish", Distro::UbuntuImpish) .Case("jammy", Distro::UbuntuJammy) .Case("kinetic", Distro::UbuntuKinetic) + .Case("lunar", Distro::UbuntuLunar) + .Case("mantic", Distro::UbuntuMantic) + .Case("noble", Distro::UbuntuNoble) + .Case("oracular", Distro::UbuntuOracular) .Default(Distro::UnknownDistro); return Version; } -- 2.30.2